package leetcode.code0032;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution32 implements IDebug {

	public abstract int longestValidParentheses(String s);

	private void debug(String s, int e) {
		int r = this.longestValidParentheses(s);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug1() {
		String s = "(()";
		int e = 2;
		debug(s, e);
	}

	@Override
	public void debug2() {
		String s = ")()())";
		int e = 4;
		debug(s, e);
	}

	@Override
	public void debug3() {
		String s = "";
		int e = 0;
		debug(s, e);
	}

	@Override
	public void debug4() {
		String s = "()(()";
		int e = 2;
		debug(s, e);
	}

}
